package com.betterjr.modules.risk.loan.entity;

import java.math.BigDecimal;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.betterjr.common.annotation.MetaData;
import com.betterjr.common.entity.BetterjrEntity;

@Access(AccessType.FIELD)
@Entity
@Table(name = "t_scf_loan_share")
public class LoanShare implements BetterjrEntity {

    /** 
     * @Fields serialVersionUID : 
     */
    private static final long serialVersionUID = -6177537091074723497L;

    /**
     * 流水号
     */
    @Id
    @Column(name = "ID", columnDefinition = "INTEGER")
    @MetaData(value = "流水号", comments = "流水号")
    private Long id;

    /**
     * 服务费表id
     */
    @Column(name = "L_SERVICE_ID", columnDefinition = "INTEGER")
    @MetaData(value = "服务费表id", comments = "服务费表id")
    private Long serviceId;

    /**
     * 供应商名称
     */
    @Column(name = "C_CUST_NAME", columnDefinition = "VARCHAR")
    @MetaData(value = "供应商名称", comments = "供应商名称")
    private String custName;

    /**
     * 供应商编号
     */
    @Column(name = "L_CUSTNO", columnDefinition = "INTEGER")
    @MetaData(value = "供应商编号", comments = "供应商编号")
    private Long custNo;

    /**
     * 供应商企业代码
     */
    @Column(name = "C_CUSTCODE", columnDefinition = "VARCHAR")
    @MetaData(value = "供应商企业代码", comments = "供应商企业代码")
    private String custCode;

    /**
     * 核心企业名称
     */
    @Column(name = "C_CORE_NAME", columnDefinition = "VARCHAR")
    @MetaData(value = "核心企业名称", comments = "核心企业名称")
    private String coreName;

    /**
     * 核心企业编号
     */
    @Column(name = "L_CORENO", columnDefinition = "INTEGER")
    @MetaData(value = "核心企业编号", comments = "核心企业编号")
    private Long coreNo;

    /**
     * 资金提供方名称
     */
    @Column(name = "C_FACTORY_NAME", columnDefinition = "VARCHAR")
    @MetaData(value = "资金提供方名称", comments = "资金提供方名称")
    private String factoryName;

    /**
     * 资金提供方编号
     */
    @Column(name = "L_FACTORYNO", columnDefinition = "INTEGER")
    @MetaData(value = "资金提供方编号", comments = "资金提供方编号")
    private Long factoryNo;

    /**
     *服务费收款日期
     */
    @Column(name = "C_GATHERING_DATE", columnDefinition = "VARCHAR")
    @MetaData(value = "服务费收款日期", comments = "服务费收款日期")
    private String gatheringDate;

    /**
     * 贷款项目交易金额
     */
    @Column(name = "F_LOAN_BALANCE", columnDefinition = "DOUBLE")
    @MetaData(value = "贷款项目交易金额", comments = "贷款项目交易金额")
    private BigDecimal loanBalance;

    /**
     * 服务费
     */
    @Column(name = "F_SERVICE_CHARGE", columnDefinition = "DOUBLE")
    @MetaData(value = "服务费", comments = "服务费")
    private BigDecimal serviceChargeBalance;

    /**
     * 分润比例
     */
    @Column(name = "F_SHARE_SCALE", columnDefinition = "DOUBLE")
    @MetaData(value = "分润比例", comments = "分润比例")
    private BigDecimal shareScale;

    /**
     * 分润费
     */
    @Column(name = "F_SHARE", columnDefinition = "DOUBLE")
    @MetaData(value = "分润费", comments = "分润费")
    private BigDecimal shareBalance;

    /**
     *结算周期类型 0 按季度结算  1 按月结算
     */
    @Column(name = "C_SETTLEACCOUNTS_TYPE", columnDefinition = "VARCHAR")
    @MetaData(value = "结算周期类型 0 按季度结算  1 按月结算", comments = "结算周期类型 0 按季度结算  1 按月结算")
    private String settleAccountsType;

    /**
     *付款日期
     */
    @Column(name = "C_PAYDATE", columnDefinition = "VARCHAR")
    @MetaData(value = "付款日期", comments = "付款日期")
    private String payDate;

    /**
     *付款时间
     */
    @Column(name = "C_PAYTIME", columnDefinition = "VARCHAR")
    @MetaData(value = "付款时间", comments = "付款时间")
    private String payTime;
    /**
     *描述说明
     */
    @Column(name = "C_DESCRIPTION", columnDefinition = "VARCHAR")
    @MetaData(value = "描述说明", comments = "描述说明")
    private String description;

    /**
     *状态  0 作废   1 待付分润费  2 已付分润费
     */
    @Column(name = "C_BUSINSTATUS", columnDefinition = "VARCHAR")
    @MetaData(value = "状态  0 作废   1 待付分润费  2 已付分润费", comments = "状态  0 作废   1 待付分润费  2 已付分润费")
    private String businStatus;

    /**
     *生成日期
     */
    @Column(name = "C_CREATEDATE", columnDefinition = "VARCHAR")
    @MetaData(value = "生成日期", comments = "生成日期")
    private String createDate;

    /**
     *付款操作员名称
     */
    @Column(name = "C_PAY_OPERATORNAME", columnDefinition = "VARCHAR")
    @MetaData(value = "付款操作员名称", comments = "付款操作员名称")
    private String payOperatorName;

    /**
     *付款类型 1：现金转账
     */
    @Column(name = "C_PAYTYPE", columnDefinition = "VARCHAR")
    @MetaData(value = "付款类型 1：现金转账", comments = "付款类型 1：现金转账")
    private String payType;

    /**
     * 付款操作员id
     */
    @Column(name = "L_PAY_OPERATORID", columnDefinition = "INTEGER")
    @MetaData(value = "付款操作员id", comments = "付款操作员id")
    private Long payOperatorId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getServiceId() {
        return serviceId;
    }

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }

    public String getCustName() {
        return custName;
    }

    public void setCustName(String custName) {
        this.custName = custName;
    }

    public Long getCustNo() {
        return custNo;
    }

    public void setCustNo(Long custNo) {
        this.custNo = custNo;
    }

    public String getCustCode() {
        return custCode;
    }

    public void setCustCode(String custCode) {
        this.custCode = custCode;
    }

    public String getCoreName() {
        return coreName;
    }

    public void setCoreName(String coreName) {
        this.coreName = coreName;
    }

    public Long getCoreNo() {
        return coreNo;
    }

    public void setCoreNo(Long coreNo) {
        this.coreNo = coreNo;
    }

    public String getFactoryName() {
        return factoryName;
    }

    public void setFactoryName(String factoryName) {
        this.factoryName = factoryName;
    }

    public Long getFactoryNo() {
        return factoryNo;
    }

    public void setFactoryNo(Long factoryNo) {
        this.factoryNo = factoryNo;
    }

    public String getGatheringDate() {
        return gatheringDate;
    }

    public void setGatheringDate(String gatheringDate) {
        this.gatheringDate = gatheringDate;
    }

    public BigDecimal getLoanBalance() {
        return loanBalance;
    }

    public void setLoanBalance(BigDecimal loanBalance) {
        this.loanBalance = loanBalance;
    }

    public BigDecimal getServiceChargeBalance() {
        return serviceChargeBalance;
    }

    public void setServiceChargeBalance(BigDecimal serviceChargeBalance) {
        this.serviceChargeBalance = serviceChargeBalance;
    }

    public BigDecimal getShareScale() {
        return shareScale;
    }

    public void setShareScale(BigDecimal shareScale) {
        this.shareScale = shareScale;
    }

    public BigDecimal getShareBalance() {
        return shareBalance;
    }

    public void setShareBalance(BigDecimal shareBalance) {
        this.shareBalance = shareBalance;
    }

    public String getSettleAccountsType() {
        return settleAccountsType;
    }

    public void setSettleAccountsType(String settleAccountsType) {
        this.settleAccountsType = settleAccountsType;
    }

    public String getPayDate() {
        return payDate;
    }

    public void setPayDate(String payDate) {
        this.payDate = payDate;
    }

    public String getPayTime() {
        return payTime;
    }

    public void setPayTime(String payTime) {
        this.payTime = payTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getBusinStatus() {
        return businStatus;
    }

    public void setBusinStatus(String businStatus) {
        this.businStatus = businStatus;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getPayOperatorName() {
        return payOperatorName;
    }

    public void setPayOperatorName(String payOperatorName) {
        this.payOperatorName = payOperatorName;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public Long getPayOperatorId() {
        return payOperatorId;
    }

    public void setPayOperatorId(Long payOperatorId) {
        this.payOperatorId = payOperatorId;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((businStatus == null) ? 0 : businStatus.hashCode());
        result = prime * result + ((coreName == null) ? 0 : coreName.hashCode());
        result = prime * result + ((coreNo == null) ? 0 : coreNo.hashCode());
        result = prime * result + ((createDate == null) ? 0 : createDate.hashCode());
        result = prime * result + ((custCode == null) ? 0 : custCode.hashCode());
        result = prime * result + ((custName == null) ? 0 : custName.hashCode());
        result = prime * result + ((custNo == null) ? 0 : custNo.hashCode());
        result = prime * result + ((description == null) ? 0 : description.hashCode());
        result = prime * result + ((factoryName == null) ? 0 : factoryName.hashCode());
        result = prime * result + ((factoryNo == null) ? 0 : factoryNo.hashCode());
        result = prime * result + ((gatheringDate == null) ? 0 : gatheringDate.hashCode());
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        result = prime * result + ((loanBalance == null) ? 0 : loanBalance.hashCode());
        result = prime * result + ((payDate == null) ? 0 : payDate.hashCode());
        result = prime * result + ((payOperatorId == null) ? 0 : payOperatorId.hashCode());
        result = prime * result + ((payOperatorName == null) ? 0 : payOperatorName.hashCode());
        result = prime * result + ((payTime == null) ? 0 : payTime.hashCode());
        result = prime * result + ((payType == null) ? 0 : payType.hashCode());
        result = prime * result + ((serviceChargeBalance == null) ? 0 : serviceChargeBalance.hashCode());
        result = prime * result + ((serviceId == null) ? 0 : serviceId.hashCode());
        result = prime * result + ((settleAccountsType == null) ? 0 : settleAccountsType.hashCode());
        result = prime * result + ((shareBalance == null) ? 0 : shareBalance.hashCode());
        result = prime * result + ((shareScale == null) ? 0 : shareScale.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof LoanShare)) {
            return false;
        }
        LoanShare other = (LoanShare) obj;
        if (businStatus == null) {
            if (other.businStatus != null) {
                return false;
            }
        } else if (!businStatus.equals(other.businStatus)) {
            return false;
        }
        if (coreName == null) {
            if (other.coreName != null) {
                return false;
            }
        } else if (!coreName.equals(other.coreName)) {
            return false;
        }
        if (coreNo == null) {
            if (other.coreNo != null) {
                return false;
            }
        } else if (!coreNo.equals(other.coreNo)) {
            return false;
        }
        if (createDate == null) {
            if (other.createDate != null) {
                return false;
            }
        } else if (!createDate.equals(other.createDate)) {
            return false;
        }
        if (custCode == null) {
            if (other.custCode != null) {
                return false;
            }
        } else if (!custCode.equals(other.custCode)) {
            return false;
        }
        if (custName == null) {
            if (other.custName != null) {
                return false;
            }
        } else if (!custName.equals(other.custName)) {
            return false;
        }
        if (custNo == null) {
            if (other.custNo != null) {
                return false;
            }
        } else if (!custNo.equals(other.custNo)) {
            return false;
        }
        if (description == null) {
            if (other.description != null) {
                return false;
            }
        } else if (!description.equals(other.description)) {
            return false;
        }
        if (factoryName == null) {
            if (other.factoryName != null) {
                return false;
            }
        } else if (!factoryName.equals(other.factoryName)) {
            return false;
        }
        if (factoryNo == null) {
            if (other.factoryNo != null) {
                return false;
            }
        } else if (!factoryNo.equals(other.factoryNo)) {
            return false;
        }
        if (gatheringDate == null) {
            if (other.gatheringDate != null) {
                return false;
            }
        } else if (!gatheringDate.equals(other.gatheringDate)) {
            return false;
        }
        if (id == null) {
            if (other.id != null) {
                return false;
            }
        } else if (!id.equals(other.id)) {
            return false;
        }
        if (loanBalance == null) {
            if (other.loanBalance != null) {
                return false;
            }
        } else if (!loanBalance.equals(other.loanBalance)) {
            return false;
        }
        if (payDate == null) {
            if (other.payDate != null) {
                return false;
            }
        } else if (!payDate.equals(other.payDate)) {
            return false;
        }
        if (payOperatorId == null) {
            if (other.payOperatorId != null) {
                return false;
            }
        } else if (!payOperatorId.equals(other.payOperatorId)) {
            return false;
        }
        if (payOperatorName == null) {
            if (other.payOperatorName != null) {
                return false;
            }
        } else if (!payOperatorName.equals(other.payOperatorName)) {
            return false;
        }
        if (payTime == null) {
            if (other.payTime != null) {
                return false;
            }
        } else if (!payTime.equals(other.payTime)) {
            return false;
        }
        if (payType == null) {
            if (other.payType != null) {
                return false;
            }
        } else if (!payType.equals(other.payType)) {
            return false;
        }
        if (serviceChargeBalance == null) {
            if (other.serviceChargeBalance != null) {
                return false;
            }
        } else if (!serviceChargeBalance.equals(other.serviceChargeBalance)) {
            return false;
        }
        if (serviceId == null) {
            if (other.serviceId != null) {
                return false;
            }
        } else if (!serviceId.equals(other.serviceId)) {
            return false;
        }
        if (settleAccountsType == null) {
            if (other.settleAccountsType != null) {
                return false;
            }
        } else if (!settleAccountsType.equals(other.settleAccountsType)) {
            return false;
        }
        if (shareBalance == null) {
            if (other.shareBalance != null) {
                return false;
            }
        } else if (!shareBalance.equals(other.shareBalance)) {
            return false;
        }
        if (shareScale == null) {
            if (other.shareScale != null) {
                return false;
            }
        } else if (!shareScale.equals(other.shareScale)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "LoanShare [id=" + id + ", serviceId=" + serviceId + ", custName=" + custName + ", custNo=" + custNo
                + ", custCode=" + custCode + ", coreName=" + coreName + ", coreNo=" + coreNo + ", factoryName="
                + factoryName + ", factoryNo=" + factoryNo + ", gatheringDate=" + gatheringDate + ", loanBalance="
                + loanBalance + ", serviceChargeBalance=" + serviceChargeBalance + ", shareScale=" + shareScale
                + ", shareBalance=" + shareBalance + ", settleAccountsType=" + settleAccountsType + ", payDate="
                + payDate + ", payTime=" + payTime + ", description=" + description + ", businStatus=" + businStatus
                + ", createDate=" + createDate + ", payOperatorName=" + payOperatorName + ", payType=" + payType
                + ", payOperatorId=" + payOperatorId + "]";
    }

}
